<?php
header('Content-Type: text/html; charset=UTF-8');
error_reporting(E_ALL & ~E_NOTICE);
@ignore_user_abort(true);
@set_time_limit(0);

$uin=$_REQUEST['uin']?$_REQUEST['uin']:exit('{"code":-10,"msg":"No Uin！"}');
$skey=$_REQUEST['skey']?$_REQUEST['skey']:exit('{"code":-1,"msg":"No Skey！"}');
$gpid=$_REQUEST['gpid']?$_REQUEST['gpid']:0;
$uins=$_REQUEST['uins']?$_REQUEST['uins']:exit('{"code":-1,"msg":"No Uins！"}');
$arr=explode(',',$uins);
$arr=array_filter($arr);
$uins=base64_encode(json_encode($arr));
echo get_curl("http://cloud.odata.cc/klapi/fenzu.php","uin={$uin}&skey={$skey}&gpid={$gpid}&uins={$uins}");

function get_curl($url,$post=0){
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL,$url);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	if($post){
		curl_setopt($ch, CURLOPT_POST, 1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
	}
	curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
	$ret = curl_exec($ch);
	curl_close($ch);
	return $ret;
}